package demo5.controller;

import demo5.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

/**
 * Controller与浏览器打交道
 */
@Controller
public class UserController {
    @Autowired
    private IUserService userService;

    public void doLogin(){
        System.out.println("userController:开始执行用户登录业务...");
        Boolean success = userService.login("admin", "123456");
        if (success){
            System.out.println("userController:回馈用户登录成功提示");
        }else {
            System.out.println("userController:回馈用户登录失败提示");
        }

    }

}
